import request from '@/utils/request'

// 1.查询企业的部门列表
export const getRoles = function(params) {
  return request.get('/sys/role', { params })
}

// 2.删除角色
export const deleteRoles = function(id) {
  return request.delete('/sys/role/' + id)
}

// 3.添加角色
export const addRoles = function(data) {
  return request.post('/sys/role', data)
}

// 4.编辑角色
export const editRoles = function(data) {
  return request.put(`/sys/role/${data.id}`, data)
}
